import { ref, computed, watch } from 'vue'
import { useRouter } from 'vue-router'

export const userInformation = (props: any, initData: any, emit: any) => {
    const router = useRouter()
    //退出登录
    const exit = async () => {
        router.push({
            path: "/",
        });
    };
    //修改密码页面
    const changePassword = async () => {
        router.push({
            path: '/changePassword',
        })
    }
    //编辑信息
    const editInformation = async () => {
        router.push({
            path: '/editInformation',
        })
    }
    const back = async () => {
        router.go(-1);
    };
    return {
        changePassword,//修改密码页面
        editInformation, //编辑信息
        exit,
        back
    };

}
